<template>
   <div class="bg-white">
      <div class="samll-table pd20" :style="{'min-height':maxHeight+'px'}">
         <div class="tit">{{title}}</div>
         <el-table
            :data="listData"
            border
            class="table"
            :max-height=maxtableHeight
            style="width: 100%">
            <el-table-column
            v-for="item in header" 
            :key="item.name"
            :label="item.label"
            :prop="item.props"
            :show-overflow-tooltip="true"
           >
            <template slot-scope="scope">
               <a href="javascript:;" style="color:#409eff;" @click="handleGoto(scope.row)" v-if="item.isjump">{{scope.row[item.props]}}</a>
               <span v-else>{{scope.row[item.props]}}</span>
            </template>
            </el-table-column>
         </el-table>
      </div>
   </div>
</template>
<script>
export default {
   name: "small_table",
   props:{
      title:String,
      header:Array,
      listData:Array,
      maxtableHeight:String,
      maxHeight:Number
    },
   created(){
      console.log(this.listData)
   },
   data(){
      return {
      } 
   },
   methods:{
      handleGoto(row){
         this.$emit('jumpHandle',row)
      }
   }
}
</script>
<style lang="scss" scoped>
.tit{
    border-bottom:1px solid #E6E6E6;
    padding:19px 0 14px 0;
}
.samll-table{
   padding-top:0px;
   min-height:390px;
   .table{
      margin-top:17px;
   }
}
</style>